function Triangle(origin){
    this.origin = origin;
    this.points=new Array(
        new Point(0,0),
        new Point(20,30),
        new Point(-20,30)
    );
    this.translate(this.origin);
}
Triangle.prototype = new Polygon();

Triangle.prototype.constructor = Triangle;

Triangle.prototype.rotate = function(radius,pivot){
    var pivot = (pivot != null) ? pivot : this.origin;
    Polygon.prototype.rotate.call(this,radius,pivot);
}